import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:honeypotflutter/public/views/public_appBar.dart';
import 'package:honeypotflutter/public/views/public_tabBar_scrollView.dart';
import 'package:honeypotflutter/publicBussine/bussine_image.dart';
import '../gather_status/view.dart';
import 'logic.dart';

class GatherPage extends StatefulWidget {
  const GatherPage({Key? key}) : super(key: key);

  @override
  State<GatherPage> createState() => _GatherPageState();
}

class _GatherPageState extends State<GatherPage> {
  final GatherLogic logic = Get.put(GatherLogic());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: HLAppBar(
        navigationTitle: "揽件",
        actions: [
          IconButton(
              onPressed: logic.pushToSearch,
              icon: Image.asset(
                MGImage.image("public_search", type: ImagePathType.public),
                width: 20,
              ))
        ],
      ),
      body: HLTabBarScrollView(mens: [
        "待揽件",
        "已揽件",
        "未结算"
      ], children: [
        GatherStatusPage(),
        GatherStatusPage(),
        GatherStatusPage(),
      ]),
    );
  }

  @override
  void dispose() {
    Get.delete<GatherLogic>();
    super.dispose();
  }
}
